home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / MosaicSRC / src / as225.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  721 b   |  49 lines

  1. #include "includes.h"
  2.  
  3. #include <proto/socket.h>
  4.  
  5. extern int errno;        /* defined by linker */
  6.  
  7. struct Library *SockBase;   /* defined here, not SockBase.c */
  8.  
  9. void
  10. _STD_300_as225 (void)
  11. {
  12.     if (SockBase)
  13.     {
  14.         cleanup_sockets ();
  15.         CloseLibrary (SockBase);
  16.         SockBase = NULL;
  17.     }
  18.  
  19.     return;
  20. }
  21.  
  22. int
  23. _STI_300_as225 (void)
  24. {
  25.     SockBase = OpenLibrary ("inet:libs/socket.library", 4);
  26.     if (!SockBase)
  27.     {
  28.         return 1;
  29.     }
  30.  
  31.     if (!setup_sockets (32, &errno))
  32.     {
  33.         /* on socket.library 6.1+, setup_sockets() cannot fail */
  34.         /* on socket.library 4.2, it'll only fail if a 128 byte malloc() fails */
  35.         _STD_300_as225 ();
  36.         return 1;
  37.     }
  38.  
  39.     return 0;
  40. }
  41.  
  42. FILE *
  43. fdopen (int fd, const char *mode)
  44. {
  45.     /* used only by WAIS */
  46.     return NULL;
  47. }
  48.  
  49.